From: Florian Müllner Date: Thu, 4 Oct 2018 15:14:00 +0000 (+0200) Subject: windowMenu: Remove fallback app menu support X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~897^2^2~10 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=62a3b9e6a37282ddca385c4579f14e4236822d64;p=gnome-shell.git windowMenu: Remove fallback app menu support With the app menu being phased out entirely, there's no good reason to keep support for the fallback app menu in decorations either - the number of applications that set an app menu and haven't embraced client-side decorations is extremely small, and they should already have alternative fallbacks for non-GNOME environment in place. https://gitlab.gnome.org/GNOME/gnome-shell/issues/624 --- diff --git a/js/ui/windowMenu.js b/js/ui/windowMenu.js index b272b3a80..354466b3c 100644 --- a/js/ui/windowMenu.js +++ b/js/ui/windowMenu.js @@ -2,12 +2,10 @@ const Meta = imports.gi.Meta; const St = imports.gi.St; -const Shell = imports.gi.Shell; const BoxPointer = imports.ui.boxpointer; const Main = imports.ui.main; const PopupMenu = imports.ui.popupMenu; -const RemoteMenu = imports.ui.remoteMenu; var WindowMenu = class extends PopupMenu.PopupMenu { constructor(window, sourceActor) { @@ -174,22 +172,6 @@ var WindowMenu = class extends PopupMenu.PopupMenu { } }; -var AppMenu = class extends RemoteMenu.RemoteMenu { - constructor(window, sourceActor) { - let app = Shell.WindowTracker.get_default().get_window_app(window); - - super(sourceActor, app.menu, app.action_group); - - this.actor.add_style_class_name('fallback-app-menu'); - let variant = window.get_gtk_theme_variant(); - if (variant) - this.actor.add_style_class_name(variant); - - Main.layoutManager.uiGroup.add_actor(this.actor); - this.actor.hide(); - } -}; - var WindowMenuManager = class { constructor() { this._manager = new PopupMenu.PopupMenuManager({ actor: Main.layoutManager.dummyCursor }); @@ -202,8 +184,9 @@ var WindowMenuManager = class { } showWindowMenuForWindow(window, type, rect) { - let menuType = (type == Meta.WindowMenuType.WM) ? WindowMenu : AppMenu; - let menu = new menuType(window, this._sourceActor); + if (type != Meta.WindowMenuType.WM) + throw new Error('Unsupported window menu type'); + let menu = new WindowMenu(window, this._sourceActor); this._manager.addMenu(menu);